package com.pro.mapper;

import com.pro.pojo.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * auther 杨沛琪
 * createDate 2022/1/11
 */
@Mapper
public interface CouponMapper {
    //获取优惠券列表
    public List<Coupon> getTable();
    //搜索查询
    public List<Coupon> queryCoupon(@Param("couponName")String couponName,@Param("grant")Integer grant,@Param("online")Integer online);
    //删除优惠券
    public boolean delCoupon(@Param("couponId") Integer couponId);
    //查看优惠券详情
    public List<Coupon> couponDetails(@Param("couponId")Integer couponId);
    //添加优惠券
    public boolean addCoupon(Coupon coupon);
    //根据优惠券名称查询优惠券
    public List<Coupon> queryCouponByName(@Param("couponName")String couponName);
    //根据id修改优惠券
    public Boolean updateUserCoupon(Coupon coupon);
}
